package com.chase.chasecat.controller;

import com.chase.chasecat.common.R;
import com.chase.chasecat.dto.LoginDTO;
import com.chase.chasecat.service.LoginService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class LoginController {
    @Resource
    private LoginService loginService;
    /**
     * 登录接口
     * @return
     */
    @PostMapping("login")
    public R login(@RequestBody LoginDTO loginDTO){
        return loginService.login(loginDTO);
    }
}
